package com.foreverwin.jzymes.production.resource.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.foreverwin.jzymes.production.resource.mapper.ResourceRepairLogMapper;
import com.foreverwin.jzymes.production.resource.domain.ResourceRepairLog;
import com.foreverwin.jzymes.production.resource.service.IResourceRepairLogService;

/**
 * 设备维修记录 服务层实现
 * 
 * @author ervin
 * @date 2019-07-08
 */
@Service
public class ResourceRepairLogServiceImpl implements IResourceRepairLogService
{
	@Autowired
	private ResourceRepairLogMapper resourceRepairLogMapper;

	/**
     * 查询设备维修记录信息
     * 
     * @param handle 设备维修记录ID
     * @return 设备维修记录信息
     */
    @Override
	public ResourceRepairLog selectResourceRepairLogById(String handle)
	{
	    return resourceRepairLogMapper.selectResourceRepairLogById(handle);
	}
	
	/**
     * 查询设备维修记录列表
     * 
     * @param resourceRepairLog 设备维修记录信息
     * @return 设备维修记录集合
     */
	@Override
	public List<ResourceRepairLog> selectResourceRepairLogList(ResourceRepairLog resourceRepairLog)
	{
	    return resourceRepairLogMapper.selectResourceRepairLogList(resourceRepairLog);
	}
	
    /**
     * 新增设备维修记录
     * 
     * @param resourceRepairLog 设备维修记录信息
     * @return 结果
     */
	@Override
	public int insertResourceRepairLog(ResourceRepairLog resourceRepairLog)
	{
	    return resourceRepairLogMapper.insertResourceRepairLog(resourceRepairLog);
	}
	
	/**
     * 修改设备维修记录
     * 
     * @param resourceRepairLog 设备维修记录信息
     * @return 结果
     */
	@Override
	public int updateResourceRepairLog(ResourceRepairLog resourceRepairLog)
	{
	    return resourceRepairLogMapper.updateResourceRepairLog(resourceRepairLog);
	}

	/**
     * 删除设备维修记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteResourceRepairLogByIds(String ids)
	{
		return resourceRepairLogMapper.deleteResourceRepairLogByIds(ids.split(","));
	}
	
}
